import request from '@/utils/request'

export function selectList(query) {
  return request({
    url: '/system/assessproject/projectList',
    method: 'get',
    params: query
  })
}

export function addDimensionality(data) {
  return request({
    url: '/system/assessproject/addDimensionality',
    method: 'post',
    data: data
  })
}


export function addBasicInfo(data) {
  return request({
    url: '/system/assessproject/addBasicInfo',
    method: 'post',
    data: data
  })
}

export function getDimensionalityList(proId) {
  return request({
    url: '/system/assessproject/getDimensionalityList/' + proId,
    method: 'get'
  })
}

export function selectTargetById(dimId) {
  return request({
    url: '/system/assessproject/selectTargetById/' + dimId,
    method: 'get'
  })
}


export function deleteDimeById(id, proId) {
  return request({
    url: '/system/assessproject/deleteDimeById/' + id + '/' + proId,
    method: 'delete'
  })
}


export function deleteTargetById(id, proId) {
  return request({
    url: '/system/assessproject/deleteTargetById/' + id + '/' + proId,
    method: 'delete'
  })
}

export function getResultByProId(proId) {
  return request({
    url: '/system/assessproject/getResultByProId/' + proId,
    method: 'get'
  })
}

export function addTargetResult(data) {
  return request({
    url: '/system/assessproject/addTargetResult',
    method: 'post',
    data: data
  })
}


export function deleteProjectById(proId) {
  return request({
    url: '/system/assessproject/deleteProjectById/' + proId,
    method: 'delete'
  })
}


export function deleteDimeByProId(proId) {
  return request({
    url: '/system/assessproject/deleteDimeByProId/' + proId,
    method: 'delete'
  })
}


export function addProject(data, totalPoints) {
  return request({
    url: '/system/assessproject/addProject/' + totalPoints,
    method: 'post',
    data: data
  })
}


export function selectPreviewByProId(proId) {
  return request({
    url: '/system/assessproject/selectPreviewByProId/' + proId,
    method: 'get'
  })
}


export function getTargetProjectById(proId) {
  return request({
    url: '/system/assessproject/getTargetProjectById/' + proId,
    method: 'get'
  })
}


export function updateTargetProject(data) {
  return request({
    url: '/system/assessproject/updateTargetProject',
    method: 'put',
    data: data
  })
}

export function selectTabResult(proId) {
  return request({
    url: '/system/assessproject/selectTabResult/' + proId,
    method: 'get'
  })
}


export function updateTab(tab, totalPoints) {
  return request({
    url: '/system/assessproject/updateTab/' + totalPoints,
    method: 'put',
    data: tab
  })
}


export function selectResultByProId(proId) {
  return request({
    url: '/system/assessproject/selectResultByProId/' + proId,
    method: 'get'
  })
}


export function editResult(data) {
  return request({
    url: '/system/assessproject/editResult',
    method: 'put',
    data: data
  })
}


export function deleteResult(id) {
  return request({
    url: '/system/assessproject/deleteResult/' + id,
    method: 'delete'
  })
}


export function selectDimTarByProId(proId) {
  return request({
    url: '/system/assessproject/selectDimTarByProId/' + proId,
    method: 'get'
  })
}


export function getTargetByProId(proId) {
  return request({
    url: '/system/assessproject/getTargetByProId/' + proId,
    method: 'get'
  })
}
